module.exports = function (req, res, next) {
    res.sendResult = function (data, status, message) {
        var fmt = req.query.fmt ? req.query.fmt : "rest"
        if (fmt === 'rest') {
            res.json({
                "data": data,
                "status": status,
                "message": message,
            })
        }
    }
    next()
}